package com.fxp.project.jiuselu.web.models.tax.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fxp.project.jiuselu.web.models.config.entity.JslConfig;
import com.fxp.project.jiuselu.web.models.config.mapper.JslConfigMapper;
import com.fxp.project.jiuselu.web.models.tax.domain.JslTax;
import com.fxp.project.jiuselu.web.models.tax.mapper.JslTaxMapper;
import com.fxp.project.jiuselu.web.models.tax.service.IJslTaxService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.math.BigDecimal;

@Service
public class JslTaxServiceImpl extends ServiceImpl<JslTaxMapper, JslTax> implements IJslTaxService {

    @Autowired
    private JslTaxMapper jslTaxMapper;
    @Autowired
    private JslConfigMapper jslConfigMapper;

    @Override
    @Transactional
    public BigDecimal getJslTax() {
        return jslConfigMapper.selectOne(null).getTax();
    }
}
